import numpy as np
import matplotlib.pyplot as plt
c1="#009ad6"
c2='#f15a22'
c3='#7fb80e'
c4='#aa2116'
c5='#ffe600'

x=np.load('445extra.npy')
rho=np.logspace(0,3,61)
star=x[:,:,8:]/0.0248


plt.figure(dpi=150)
#plt.plot(rho,np.mean(star,axis=1)[:,2],'--',color=c1,lw=5,label=r'$\sigma_{\rm*,PE}$')
plt.plot(rho,np.mean(star,axis=1)[:,3],'k-.',alpha=0.5,
         label=r'$\sigma_{\rm*,PM}$ (K17PMm,$\sigma_*$)')
#plt.plot(rho,np.mean(star,axis=1)[:,1],'-.',color=c4,lw=3,label=r'$\sigma_{\rm *,MAP}$')
#plt.plot(rho,np.mean(star,axis=1)[:,0],':',color=c2,lw=3,label=r'$\sigma_{\rm *,MLE}$')

plt.xscale('log')
plt.yscale('log')
plt.xlabel(r'$T/\tau_{\rm in}$',fontsize=20)
plt.ylabel(r'$\sigma_{\rm*,out}/<\sigma_{\rm OGLE}>$',fontsize=20)
plt.text(2,1.5e-3,'mean',fontsize=20)
plt.xlim(1,1000)
plt.ylim(1e-3,1e-1)
plt.grid()
plt.legend(fontsize=15,loc=1)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
plt.title(r'K17 prior (N = 445, $\sigma_{\rm e}=\sigma_{\rm OGLE}$)',fontsize=20)
plt.show()
